package com.dotflat.photoAlbum.repository;

import com.dotflat.photoAlbum.domain.PhotoAlbumStatic;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;


public interface PhotoAlbumStaticRepository extends JpaRepository<PhotoAlbumStatic, String>, JpaSpecificationExecutor<PhotoAlbumStatic> {

       PhotoAlbumStatic getFirstByAreaIdAndId(String areaId, String id);

       Page<PhotoAlbumStatic> findByChildrenIdAndAreaIdOrderByCreatedDesc(String childrenId, String areaId, Pageable pageable);

}
